<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <TITLE>ThinkPHP示例：数据缓存</TITLE>
<link rel='stylesheet' type='text/css' href='__PUBLIC__/Css/common.css'>
 </HEAD>
 <SCRIPT LANGUAGE="JavaScript">
 <!--
	function showTrace(){
		document.getElementById('trace_info').innerHTML = document.getElementById('think_page_trace').innerHTML;
		document.getElementById('think_page_trace').innerHTML = '';
	}
 //-->
 </SCRIPT>
 <BODY onload="showTrace()">
 <div class="main">
 <H2>ThinkPHP示例之：动态数据缓存</H2>
ThinkPHP可以方便地对动态数据进行缓存，并设置有效期。<BR>下面的例子把数据库的查询结果缓存，有效期设置为10秒，请<A HREF="__URL__">刷新页面</A>查看SQL记录和数据是否有变化~<BR>
<div class="result" style="font-weight:normal">
查询的数据结果：<BR>
<volist name="list" id="vo">
[{$vo.id}]--{$vo.title}<BR>
</volist>
</div>
<div id="trace_info"></div>
 <TABLE cellpadding=2 cellspacing=2>
 <TR>
 <TD></TD>
	<TD >示例源码<BR>控制器IndexAction类<BR><php>highlight_file(LIB_PATH.'Action/IndexAction.class.php');</php></TD>
 </TR>
 </TABLE>
</div>
 </BODY>
</HTML>
